feat: setup websockify - #1030
Conversation
This change makes it possible to connect the client over WebSocket. Running `websocat wss://example.org/imap` connects to the IMAP and running `websocat wss://example.org/smtp` connects to SMTP (submission service, not port 25). Connecting from a web client will still need a CORS policy for clients not running on the same domain, but for non-web clients this is already usable.
|
The next step is adding some support to the clients, with manual configuration for now. WebSocket can eventually phase out ALPN-based stream multiplexing, but i'm not removing it and it can coexist with websockets, there is no need to migrate existing users. Discovery of websockets, e.g. extending autoconfig XML or QR codes, is also left for the future. |
|
What about listening on a unix socket? |
|
Also, did you measure the performance and resource usage of websockify? |
I'm using dynamicuser currently to avoid dealing with filesystem permissions. With unix socket we will need to think about how to make nginx access it, who creates the socket and where etc. Don't think using 2 ports is a problem.
The reason i have set it up is because it is already avaliable in Debian. Don't know if it will cause problems, but it's good enough for testing. We need core implementation first that will allow to setup it manually, but even then it will not be used by a lot of people because it still needs manual configuration. |
This change makes it possible
to connect the client over WebSocket.
Running
websocat wss://example.org/imapconnects to the IMAP
and running
websocat wss://example.org/smtpconnects to SMTP (submission service, not port 25).
Connecting from a web client will still need a CORS policy for clients not running on the same domain,
but for non-web clients this is already usable.